Optimal. Leaf size=132 \[ \frac{i b \sqrt{d} n \text{PolyLog}\left (2,-\frac{i \sqrt{e} x}{\sqrt{d}}\right )}{2 e^{3/2}}-\frac{i b \sqrt{d} n \text{PolyLog}\left (2,\frac{i \sqrt{e} x}{\sqrt{d}}\right )}{2 e^{3/2}}-\frac{\sqrt{d} \tan ^{-1}\left (\frac{\sqrt{e} x}{\sqrt{d}}\right ) \left (a+b \log \left (c x^n\right )\right )}{e^{3/2}}+\frac{a x}{e}+\frac{b x \log \left (c x^n\right )}{e}-\frac{b n x}{e} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.164603, antiderivative size = 132, normalized size of antiderivative = 1., number of steps used = 9, number of rules used = 8, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.348, Rules used = {321, 205, 2351, 2295, 2324, 12, 4848, 2391} \[ \frac{i b \sqrt{d} n \text{PolyLog}\left (2,-\frac{i \sqrt{e} x}{\sqrt{d}}\right )}{2 e^{3/2}}-\frac{i b \sqrt{d} n \text{PolyLog}\left (2,\frac{i \sqrt{e} x}{\sqrt{d}}\right )}{2 e^{3/2}}-\frac{\sqrt{d} \tan ^{-1}\left (\frac{\sqrt{e} x}{\sqrt{d}}\right ) \left (a+b \log \left (c x^n\right )\right )}{e^{3/2}}+\frac{a x}{e}+\frac{b x \log \left (c x^n\right )}{e}-\frac{b n x}{e} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 321
Rule 205
Rule 2351
Rule 2295
Rule 2324
Rule 12
Rule 4848
Rule 2391
Rubi steps
\begin{align*} \int \frac{x^2 \left (a+b \log \left (c x^n\right )\right )}{d+e x^2} \, dx &=\int \left (\frac{a+b \log \left (c x^n\right )}{e}-\frac{d \left (a+b \log \left (c x^n\right )\right )}{e \left (d+e x^2\right )}\right ) \, dx\\ &=\frac{\int \left (a+b \log \left (c x^n\right )\right ) \, dx}{e}-\frac{d \int \frac{a+b \log \left (c x^n\right )}{d+e x^2} \, dx}{e}\\ &=\frac{a x}{e}-\frac{\sqrt{d} \tan ^{-1}\left (\frac{\sqrt{e} x}{\sqrt{d}}\right ) \left (a+b \log \left (c x^n\right )\right )}{e^{3/2}}+\frac{b \int \log \left (c x^n\right ) \, dx}{e}+\frac{(b d n) \int \frac{\tan ^{-1}\left (\frac{\sqrt{e} x}{\sqrt{d}}\right )}{\sqrt{d} \sqrt{e} x} \, dx}{e}\\ &=\frac{a x}{e}-\frac{b n x}{e}+\frac{b x \log \left (c x^n\right )}{e}-\frac{\sqrt{d} \tan ^{-1}\left (\frac{\sqrt{e} x}{\sqrt{d}}\right ) \left (a+b \log \left (c x^n\right )\right )}{e^{3/2}}+\frac{\left (b \sqrt{d} n\right ) \int \frac{\tan ^{-1}\left (\frac{\sqrt{e} x}{\sqrt{d}}\right )}{x} \, dx}{e^{3/2}}\\ &=\frac{a x}{e}-\frac{b n x}{e}+\frac{b x \log \left (c x^n\right )}{e}-\frac{\sqrt{d} \tan ^{-1}\left (\frac{\sqrt{e} x}{\sqrt{d}}\right ) \left (a+b \log \left (c x^n\right )\right )}{e^{3/2}}+\frac{\left (i b \sqrt{d} n\right ) \int \frac{\log \left (1-\frac{i \sqrt{e} x}{\sqrt{d}}\right )}{x} \, dx}{2 e^{3/2}}-\frac{\left (i b \sqrt{d} n\right ) \int \frac{\log \left (1+\frac{i \sqrt{e} x}{\sqrt{d}}\right )}{x} \, dx}{2 e^{3/2}}\\ &=\frac{a x}{e}-\frac{b n x}{e}+\frac{b x \log \left (c x^n\right )}{e}-\frac{\sqrt{d} \tan ^{-1}\left (\frac{\sqrt{e} x}{\sqrt{d}}\right ) \left (a+b \log \left (c x^n\right )\right )}{e^{3/2}}+\frac{i b \sqrt{d} n \text{Li}_2\left (-\frac{i \sqrt{e} x}{\sqrt{d}}\right )}{2 e^{3/2}}-\frac{i b \sqrt{d} n \text{Li}_2\left (\frac{i \sqrt{e} x}{\sqrt{d}}\right )}{2 e^{3/2}}\\ \end{align*}
Mathematica [A] time = 0.109913, size = 170, normalized size = 1.29 \[ \frac{b \sqrt{-d} n \text{PolyLog}\left (2,\frac{\sqrt{e} x}{\sqrt{-d}}\right )-b \sqrt{-d} n \text{PolyLog}\left (2,\frac{d \sqrt{e} x}{(-d)^{3/2}}\right )-\sqrt{-d} \log \left (\frac{\sqrt{e} x}{\sqrt{-d}}+1\right ) \left (a+b \log \left (c x^n\right )\right )+\sqrt{-d} \log \left (\frac{d \sqrt{e} x}{(-d)^{3/2}}+1\right ) \left (a+b \log \left (c x^n\right )\right )+2 a \sqrt{e} x+2 b \sqrt{e} x \log \left (c x^n\right )-2 b \sqrt{e} n x}{2 e^{3/2}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] time = 0.174, size = 512, normalized size = 3.9 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F] time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{b x^{2} \log \left (c x^{n}\right ) + a x^{2}}{e x^{2} + d}, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{x^{2} \left (a + b \log{\left (c x^{n} \right )}\right )}{d + e x^{2}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (b \log \left (c x^{n}\right ) + a\right )} x^{2}}{e x^{2} + d}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]